﻿namespace NHibernateCodeGenerator
{
    using System;
    using System.Collections.Generic;
    using System.Windows.Forms;
    using System.Xml;

    public class DatabaseType
    {
        public static List<DatabaseItem> GetDbTypes()
        {
            XmlDocument document = new XmlDocument();
            document.Load(Application.StartupPath + @"\DbType.xml");
            XmlNode documentElement = document.DocumentElement;
            List<DatabaseItem> list = new List<DatabaseItem>();
            foreach (XmlNode node2 in documentElement.ChildNodes)
            {
                DatabaseItem item = new DatabaseItem {
                    DisplayName = node2.Attributes["displayName"].Value,
                    ClassName = node2.Attributes["className"].Value
                };
                list.Add(item);
            }
            return list;
        }
    }
}

